import VueRouter from 'vue-router'

// 导入 Account 组件

// 导入Account的两个子组件
import HomeContainer from './component/tabbar/HomeContainer.vue'
import MemberContainer from './component/tabbar/MemberContainer.vue'
import ShopcarContainer from './component/tabbar/ShopcarContainer.vue'
import SearchContainer from './component/tabbar/SearchContainer.vue'
import NewsListContainer from './component/news/NewsList.vue'
import NewsInfoContainer from './component/news/NewsInfo.vue'
import PhotoList from './component/photos/PhotoList.vue'
import photoinfo from './component/photos/photoinfo.vue'
import goodlist from './component/goods/goodlist.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    // account  goodslist
    { path: '/', redirect: '/home' },
    { path: '/home', component: HomeContainer },
    { path: '/member', component: MemberContainer },
    { path: '/shopcar', component: ShopcarContainer },
    { path: '/search', component: SearchContainer },
    { path: '/home/newslist', component: NewsListContainer },
    { path: '/home/newsinfo/:id', component: NewsInfoContainer },
    { path: '/home/photolist', component: PhotoList },
    { path: '/home/photoinfo/:id', component: photoinfo },
    { path: '/home/goodslist', component: goodlist },
  ],
  linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去
export default router